package com.fzy.core.utils;

public class NumberUtils extends org.apache.commons.lang.math.NumberUtils {

	public static Long createLongSafely(String value) {
		if (value == null) {
			return null;
		}

		try {
			return new Long(value);
		} catch (NumberFormatException e) {
			return null;
		}
	}

	public static Integer createIntegerSafely(String value) {
		if (value == null) {
			return null;
		}

		try {
			return new Integer(value);
		} catch (NumberFormatException e) {
			return null;
		}
	}

	public static Double createDoubleSafely(String value) {
		if (value == null) {
			return null;
		}

		try {
			return new Double(value);
		} catch (NumberFormatException e) {
			return null;
		}
	}

}
